<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        function Person() {
            this.name = "赵四"
            this.sayName = function () {
                console.log(`hello i am ${this.name}`)
            }
        }
        Person.prototype.name = "Nicholas"
        Person.prototype.age = 29
        Person.prototype.job = "software engineer"
        
        // var per1 = new Person("Nicholas", 29, "software engineer");
        // var per2 = new Person("jack", 25, "html engineer");
        var p1 = new Person()
        var p2 = new Person()
        p1.name //"赵四"
        p1.age //29
    </script>
</body>

</html>